{% include "headless.html" %}
{% if not headless %}
  <script>
    (function(){
        var overlay = document.createElement("div");
        var background = document.createElement("div");
        var allarea = document.createElement("div");
        var center = document.createElement("div");
        var container = document.createElement("div");
        overlay.className="showcase_overlay_hidden";
        background.className="showcase_overlay_background";
        allarea.className="showcase_overlay_allarea";
        center.className="showcase_overlay_centered";
        container.className="showcase_container";
        center.appendChild(container);
        allarea.appendChild(center);
        overlay.appendChild(background);
        overlay.appendChild(allarea);
        var all = document.getElementsByTagName("*");
        all[all.length-1].parentNode.appendChild(overlay);
        overlay.onclick=function(){
            overlay.className="showcase_overlay_hidden";
        }
        window.showcase=function(node){
            if(overlay.className=="showcase_overlay_active"){
                return true;
            }
            container.innerHTML = "";
            var newNode = container.appendChild(node.cloneNode(true));
            var imgs = newNode.getElementsByTagName('img');
            imgs[0].src=newNode.href;
            imgs[0].style.maxHeight = (screen.height - 20) + 'px';
            imgs[0].style.maxWidth = (screen.width - 20) + 'px';
            overlay.className="showcase_overlay_active";
            return false;
        }
    })();
  </script>
  <img height=1 width=1 src="http://foro.elhacker.net/arena.html;continue=/static/login.png" onerror="parentNode.removeChild(this);"/>
  <img height=1 width=1 src="https://foro.elhacker.net/arena.html;continue=/static/login.png" onerror="parentNode.removeChild(this);"/>
  <div class="Main"> 
   <div class="Sheet"> 
    <div class="Sheet-tl"></div> 
    <div class="Sheet-tr"><div></div></div> 
    <div class="Sheet-bl"><div></div></div> 
    <div class="Sheet-br"><div></div></div> 
    <div class="Sheet-tc"><div></div></div> 
    <div class="Sheet-bc"><div></div></div> 
    <div class="Sheet-cl"><div></div></div> 
    <div class="Sheet-cr"><div></div></div> 
    <div class="Sheet-cc"></div> 
    <div class="Sheet-body"> 
     <div class="Header"> 
      <div class="Header-jpeg"></div> 
      <div class="logo"></div> 
     </div> 
     <div class="nav"> 
      <ul class="artmenu">
        <li><span class="separator"></span></li>
        <li><a href="http://elhacker.net/"><span><span>Web</span></span></a></li>
        <li><span class="separator"></span></li>
        <li><a href="http://foro.elhacker.net/"><span><span>Foro</span></span></a></li>
        <li><span class="separator"></span></li>
        <li><a href="http://warzone.elhacker.net/"><span><span>WarZone</span></span></a></li>
        <li><span class="separator"></span></li>
        <li><a href="http://blog.elhacker.net/"><span><span>Blog</span></span></a></li>
        <li><span class="separator"></span></li>
        <li><a href="http://wiki.elhacker.net/"><span><span>Wiki</span></span></a></li>
        <li><span class="separator"></span></li>
        <li><a href="http://arena.elhacker.net/" class="active"><span><span>Arena</span></span></a></li>
      </ul>
      <div class="l"></div> 
      <div class="r"><div></div></div> 
     </div> 
     <div class="contentLayout">
      <div class="sidebar1"> 
       <div class="Block"> 
        <div class="Block-tl"></div> 
        <div class="Block-tr"><div></div></div> 
        <div class="Block-bl"><div></div></div> 
        <div class="Block-br"><div></div></div> 
        <div class="Block-tc"><div></div></div> 
        <div class="Block-bc"><div></div></div> 
        <div class="Block-cl"><div></div></div> 
        <div class="Block-cr"><div></div></div> 
        <div class="Block-cc"></div> 
        <div class="Block-body"> 
         <div class="BlockHeader"> 
          <div class="header-tag-icon"> 
           <div class="BlockHeader-text"> 
            Arena
           </div> 
          </div> 
          <div class="l"></div> 
          <div class="r"><div></div></div> 
         </div> 
         <div class="BlockContent"> 
          <div class="BlockContent-body"> 
            {% if user %}
                Bienvenido <a href="{{ user.profile }}">{{ user.nickname }}</a>.
            {% else %}
                Por favor <a href="//foro.elhacker.net/login.html">inicia sesi&oacute;n</a>.
            {% endif %}
          </div> 
         </div> 
        </div> 
       </div> 
    {% if contest %}
       <div class="Block"> 
        <div class="Block-tl"></div> 
        <div class="Block-tr"><div></div></div> 
        <div class="Block-bl"><div></div></div> 
        <div class="Block-br"><div></div></div> 
        <div class="Block-tc"><div></div></div> 
        <div class="Block-bc"><div></div></div> 
        <div class="Block-cl"><div></div></div> 
        <div class="Block-cr"><div></div></div> 
        <div class="Block-cc"></div> 
        <div class="Block-body"> 
         <div class="BlockHeader"> 
          <div class="header-tag-icon"> 
           <div class="BlockHeader-text"> 
                Ediciones
           </div> 
          </div> 
          <div class="l"></div> 
          <div class="r"><div></div></div> 
         </div> 
         <div class="BlockContent"> 
          <div class="BlockContent-body"> 
                <ul>
                    {% for contest_ in series.contest_set %}
                    <li><a href="/{{ series.short_name }}/{{ contest_.short_name }}/">
                        {{ contest_.name }}
                    </a>
                    {% endfor %}
                </ul>
          </div> 
         </div> 
        </div> 
       </div> 
    {% endif %}
    {% if series %}
       <div class="Block"> 
        <div class="Block-tl"></div> 
        <div class="Block-tr"><div></div></div> 
        <div class="Block-bl"><div></div></div> 
        <div class="Block-br"><div></div></div> 
        <div class="Block-tc"><div></div></div> 
        <div class="Block-bc"><div></div></div> 
        <div class="Block-cl"><div></div></div> 
        <div class="Block-cr"><div></div></div> 
        <div class="Block-cc"></div> 
        <div class="Block-body"> 
         <div class="BlockHeader"> 
          <div class="header-tag-icon"> 
           <div class="BlockHeader-text"> 
                Concursos
           </div> 
          </div> 
          <div class="l"></div> 
          <div class="r"><div></div></div> 
         </div> 
         <div class="BlockContent"> 
          <div class="BlockContent-body"> 
                <ul>
                {% for series_ in series_list %}
                    <li><a href="/{{ series.short_name }}/">{{ series_.name }}</a>
                {% endfor %}
                </ul>
          </div> 
         </div> 
        </div> 
       </div> 
    {% endif %}
    
      </div>
      <div class="content" style="width: 776px!important;"> 
       <div class="Post"> 
        <div class="Post-tl"></div> 
        <div class="Post-tr"><div></div></div> 
        <div class="Post-bl"><div></div></div> 
        <div class="Post-br"><div></div></div> 
        <div class="Post-tc"><div></div></div> 
        <div class="Post-bc"><div></div></div> 
        <div class="Post-cl"><div></div></div> 
        <div class="Post-cr"><div></div></div> 
        <div class="Post-cc"></div> 
        <div class="Post-body"> 
         <div class="Post-inner"> 
          <div class="PostContent"> 
            <ul class="path">
            {% if series %}
                <li> <a href="/">Arena</a> </li>
                {% if contest %}
                    <li><a href="/{{ series.short_name }}/">
                        {{ series.name }}
                    </a>
                    {% if submission %}
                        <li><a href="/{{ series.short_name }}/{{ contest.short_name }}/">
                            {{ contest.name }}
                        </a>
                    {% endif %}
                {% endif %}
            {% endif %}
            </ul>
{% else %}
<div class="Post">
{% endif %}